﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DTO;


namespace DAO
{
    public class ThucDonDuTruDB
    {
        DataProvider dp = new DataProvider();
        DataTable dt = new DataTable();
        public DataTable LayDSThucDonDuTru()
        {
            string sql = "select *  from ThucDonDuTru order by MaTuan desc";
            dt = dp.ExecuteQuery(sql);
            return dt;
        }
        public bool ThemThucDonDutru(ThucDonDuTru dto)
        {
            string sql = "insert into ThucDonDuTru(TenTuan,NgayBatDau,NgayKetThuc) values ('" + dto.TenTuan + "','" + dto.NgayBatDau + "','" + dto.NgayKetThuc + "')";
            return dp.ExecuteNonQuery(sql);
        }
    }
}
